﻿using GreenXi.Model;
using static GreenXi.App;

namespace GreenXi.ViewModel
{
    public class MainWindowViewModel : MainWindowModel
    {
        /// <summary>
        /// 初始化
        /// </summary>
        public static void Init()
        {
            //加载菜单栏
            var resources = System.Windows.Application.Current.Resources;

            if (CurrentUser.RoleLevel <= 3) //C权限者可以看的
            {
                //设备运行
                //menuFinancial.Add(new SubItem("自动模式", new Equipment()));//主画面
                //menuFinancial.Add(new SubItem("手动模式", new Equipment()));//新增

                ////数据查询
                //menuReports.Add(new SubItem("生产数据", new PressureCurve()));
                //menuReports.Add(new SubItem("日志查询", new LogList()));

                ////工艺配置
                //menuExpenses.Add(new SubItem("压装程序设定", new Craft()));
                //menuExpenses.Add(new SubItem("监控窗口设置", new Demarcate()));

                ////系统设置
                //menuSchedule.Add(new SubItem("IO配置", new IOConfiguration()));
                //menuSchedule.Add(new SubItem("设备标定", new Demarcate()));
                //menuSchedule.Add(new SubItem("协议配置", new IOView()));
                //menuSchedule.Add(new SubItem("状态监控", new IOView()));
                //menuSchedule.Add(new SubItem("系统参数设置", new SystemSettingsView()));
                //menuSchedule.Add(new SubItem("备份数据库"));


                //menuRegister.Add(new SubItem("账号切换", new UserView()));
                //menuRegister.Add(new SubItem("账号管理", new UserView()));
                //menuRegister.Add(new SubItem("注销账号"));
            }

            if (CurrentUser.RoleLevel <= 2) //B权限者可以看的
            { }

            if (CurrentUser.RoleLevel <= 1) //A权限者可以看的
            { }
        }

        public MainWindowViewModel()
        {
            Init(); //初始化
        }
    }
}
